Check for broadcom platform sdk init ready during syncd start. #2931
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
- What I did
During boot/reload time, wait in a loop to check for bcm initialization.
Break the loop, once sdk is ready to process the 'bcmcmd' request (or) loop count reached the maximum value.
- How I did it
In the existing implementation during syncd start process will sleep for a fixed time (3 secs)
for sdk initialization to happen. But the time taken for sdk initialization is varying for different platforms.
To fix this issue, the syncd start process wait in a loop and check whether sdk is ready to process 'bcmcmd' command.
- How to verify it
Check for syncd process status and interface status.
Check for syslogs and no failures related to syncd should be present.
Without fix:
This issue is not seen on all platforms.
When this issue is observed, the syncd initialization and ledinit are failed. The system is not in a ready state.
The show commands ('show interface status', 'show arp' etc) will not display any output.
The syslogs contains the below failure information.
2016-12-08 16:22:36,675 INFO success: ledinit entered RUNNING state, process has stayed up for > than 0 seconds (startsecs)
2016-12-08 16:22:36,770 INFO exited: start.sh (exit status 0; expected)
2016-12-08 16:23:36,717 INFO exited: ledinit (exit status 62; not expected)